home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 1996 #6
/
Amiga Plus CD - 1996 - No. 06.iso
/
pd
/
netz
/
internet-set.v4.0
/
amitcp-4.0
/
bin
/
backup.rexx
next >
Wrap
OS/2 REXX Batch file
|
1996-07-22
|
892b
|
58 lines
/* Backup and Restore Net-Set files */
Call AddLib("rexxsupport.library",0,-30,0)
Do While HelpMe ~= 'Z'
Say''
Say 'What do you want me to do (B)ackup or (R)estore ?'
Say ''
pull DoThis
Say ''
Say 'You chose ('||DoThis||') are you sure ? (Y/N)'
Say ''
pull Reply
If Reply = 'N' Then HelpMe = 'A'
Else HelpMe = 'Z'
EndIF
Say ''
If DoThis = 'B' Then Call BackIt
Else Call RestoreIt
EndIf
Say 'All Done'
Exit
/* Back it up */
BackIt:
MakeDir("AmiTCP:bin/backups")
address command
'copy AmiTCP:bin/netdial.#? AmiTCP:bin/backups'
'copy AmiTCP:bin/hangup.rexx AmiTCP:bin/backups'
'copy AmiTCP:db/resolv.conf AmiTCP:bin/backups'
HelpMe = 'Z'
return
/* Restore it to original */
RestoreIt:
address command
'copy AmiTCP:bin/backups/netdial.#? AmiTCP:bin'
'copy AmiTCP:bin/backups/hangup.rexx AmiTCP:bin'
'copy AmiTCP:bin/backups/resolv.conf AmiTCP:db'
HelpMe = 'Z'
return